package com.zygh.lz.controller;

import com.zygh.lz.service.SignService;
import com.zygh.lz.vo.ResultBean;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/sign")
public class SignController {
    @Resource
    private SignService signService;



    //应签岗位数 当前排班 高峰岗，平峰岗，夜班(xarea)岗位数
    //签到岗位数 当前排班 高峰岗，平峰岗，夜班(xarea)签到的岗位数
    //签到岗位率 签到岗位数/应签岗位数*100%
    //早高峰晚高峰，应签警力数量=高峰+平峰
    @GetMapping("/order")
    public ResultBean order(HttpServletRequest request) {
        return signService.order(request);
    }

    @GetMapping("/empty")
    @ApiOperation("空岗数量")
    public ResultBean empty(HttpServletRequest request){
        return signService.empty(request);
    }

    //特殊勤务在线警力
    @GetMapping("/special")
    public ResultBean special() {
        return signService.special();
    }

    @GetMapping("/sign")
    @ApiOperation(value = "给市局推送的签到数据")
    public ResultBean getPushSingData() {
        return signService.getPushSingData();
    }
}
